﻿using System;
using System.Data;
using System.Data.SqlClient;


namespace Team4Mock.DAO
{
    public class PremiseDAO
    {
        Helper h=new Helper();
        public DataTable Getdata()
        {
            return h.GetData("Premise_Getdata");
        }
        public DataTable GetdataTrue()
        {
            return h.GetData("Premise_GetdataTrue");
        }
        public DataTable Search(string key)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@key", key);
            p[0].SqlDbType = SqlDbType.VarChar;
            return h.GetData("Premise_Search",p);
        }
        public DataTable SearchTrue(string key)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@key", key);
            p[0].SqlDbType = SqlDbType.VarChar;
            return h.GetData("Premise_SearchTrue",p);
        }
        public DataTable GetdataByID(int id)
        {
            SqlParameter[]p=new SqlParameter[1];
            p[0]=new SqlParameter("@id",id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetdataByID", p);
        }
        public DataTable GetdataByIDP(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetdataByIDP", p);
        }
        public DataTable GetAcc()
        {
            return h.GetData("Premise_GetAcc");
        }
        public DataTable GetCatTyp()
        {
            return h.GetData("Premise_GetCatTyp");
        }
        public DataTable GetJcpOff()
        {
            return h.GetData("Premise_GetJcpOff");
        }
        public DataTable GetLocDem()
        {
            return h.GetData("Premise_GetLocDem");
        }
        public DataTable GetLocHot()
        {
            return h.GetData("Premise_GetLocHot");
        }
        public DataTable GetOutLoc()
        {
            return h.GetData("Premise_GetOutLoc");
        }
        public DataTable GetLocTyp()
        {
            return h.GetData("Premise_GetLocTyp");
        }
        public int GetID()
        {
            return h.GetValueInt("Premise_GetID");
        }
        public void InsertAcc(int id, int refid)
        {
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@Refid", refid);
            p[1].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_InsertAcc", p);
        }
        public DataTable GetAccByID(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetAccByID", p);
        }
        public void InsertJcpOff(int id, int refid)
        {
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@Refid", refid);
            p[1].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_InsertJcpOff", p);
        }
        public DataTable GetJcpByID(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetJcpOffByID", p);
        }
        public void InsertLocDem(int id, int refid)
        {
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@Refid", refid);
            p[1].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_InsertLocDem", p);
        }
        public DataTable GetLocDemByID(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetLocDemByID", p);
        }
        public void InsertLocHot(int id, int refid)
        {
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@Refid", refid);
            p[1].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_InsertLocHot", p);
        }
        public DataTable GetLocHotByID(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetLocHotByID", p);
        }
        public void InsertLocTyp(int id, int refid)
        {
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@Refid", refid);
            p[1].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_InsertLocTyp", p);
        }
        public DataTable GetLocTypByID(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetLocTypByID", p);
        }
        public void InsertOutLoc(int id, int refid)
        {
            SqlParameter[] p = new SqlParameter[2];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            p[1] = new SqlParameter("@Refid", refid);
            p[1].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_InsertOutLoc", p);
        }
        public DataTable GetOutLocByID(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@id", id);
            p[0].SqlDbType = SqlDbType.Int;
            return h.GetData("Premise_GetOutLocByID", p);
        }
        public void DelAcc(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_DelAcc", p);
        }
        public void DelJcpOff(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_DelJcpOff", p);
        }
        public void DelLocDem(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_DelLocDem", p);
        }
        public void DelLocHot(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_DelLocHot", p);
        }
        public void DelLocTyp(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_DelLocTyp", p);
        }
        public void DelOutLoc(int id)
        {
            SqlParameter[] p = new SqlParameter[1];
            p[0] = new SqlParameter("@PreID", id);
            p[0].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_DelOutLoc", p);
        }
        public void Insert(string name, string know, int orgid, string status, string statusdate, string add1, string add2, string add3, string postcode, string town, string county, string country, int primaryloc, int localmana, int stnetwork, string localdes, string phone, string fax, string mininum, int isnewshop, string shopflagdate, int specshop, int mediacontact, string medianame, string localdemo, int catefac, string catecontact, string catetype, string isnetwork, int clientit, string clientitdetail, int room, int volun, string traveldetail, string travelbus, string travelrail, string travelairport, int hostvisit, string hostcontact, int visitonsite, string visitspace, string visitaltema, string roomrate, string bandrate, string dbrate, string ddrate, string hrrate, string teaandcoffe, int lunch, string nometting, string meetingroom, string coding, string negorate, string bbnegorate, string dbbnego, string ddnego, string hrnego, string lastnego, string renego, string preferred, string commnent,int active)
        {
            SqlParameter[] p=new SqlParameter[62];
            p[0] = new SqlParameter("@name", name);
            p[0].SqlDbType = SqlDbType.NVarChar;
            p[1] = new SqlParameter("@know", know);
            p[1].SqlDbType = SqlDbType.NVarChar;
            p[2] = new SqlParameter("@orgid", orgid);
            p[2].SqlDbType = SqlDbType.Int;
            p[3] = new SqlParameter("@comment", commnent);
            p[3].SqlDbType = SqlDbType.NVarChar;
            p[4] = new SqlParameter("@status", status);
            p[4].SqlDbType = SqlDbType.NVarChar;
            p[5] = new SqlParameter("@statusdate", statusdate);
            p[5].SqlDbType = SqlDbType.NVarChar;
            p[6] = new SqlParameter("@add1", add1);
            p[6].SqlDbType = SqlDbType.NVarChar;
            p[7] = new SqlParameter("@add2", add2);
            p[7].SqlDbType = SqlDbType.NVarChar;
            p[8] = new SqlParameter("@add3", add3);
            p[8].SqlDbType = SqlDbType.NVarChar;
            p[9] = new SqlParameter("@postcode", postcode);
            p[9].SqlDbType = SqlDbType.VarChar;
            p[10] = new SqlParameter("@town", town);
            p[10].SqlDbType = SqlDbType.VarChar;
            p[11] = new SqlParameter("@county", county);
            p[11].SqlDbType = SqlDbType.VarChar;
            p[12] = new SqlParameter("@country", country);
            p[12].SqlDbType = SqlDbType.VarChar;
            p[13] = new SqlParameter("@primarylocation", primaryloc);
            p[13].SqlDbType = SqlDbType.Int;
            p[14] = new SqlParameter("@locationmanager", localmana);
            p[14].SqlDbType = SqlDbType.Int;
            p[15] = new SqlParameter("@stnetwork", stnetwork);
            p[15].SqlDbType = SqlDbType.Int;
            p[16] = new SqlParameter("@locades", localdes);
            p[16].SqlDbType = SqlDbType.NVarChar;
            p[17] = new SqlParameter("@phone", phone);
            p[17].SqlDbType = SqlDbType.VarChar;
            p[18] = new SqlParameter("@fax", fax);
            p[18].SqlDbType = SqlDbType.VarChar;
            p[19] = new SqlParameter("@mininumber", mininum);
            p[19].SqlDbType = SqlDbType.VarChar;
            p[20] = new SqlParameter("@isnewshop", isnewshop);
            p[20].SqlDbType = SqlDbType.Int;
            p[21] = new SqlParameter("@shopflagdate", shopflagdate);
            p[21].SqlDbType = SqlDbType.NVarChar;
            p[22] = new SqlParameter("@specshop", specshop);
            p[22].SqlDbType = SqlDbType.Int;
            p[23] = new SqlParameter("@mediacontact", mediacontact);
            p[23].SqlDbType = SqlDbType.Int;
            p[24] = new SqlParameter("@mediacontactname", medianame);
            p[24].SqlDbType = SqlDbType.VarChar;
            p[25] = new SqlParameter("@localdemo", localdemo);
            p[25].SqlDbType = SqlDbType.NVarChar;
            p[26] = new SqlParameter("@cateringfac", catefac);
            p[26].SqlDbType = SqlDbType.Int;
            p[27] = new SqlParameter("@cateringcontact", catecontact);
            p[27].SqlDbType = SqlDbType.VarChar;
            p[28] = new SqlParameter("@cateringtype", catetype);
            p[28].SqlDbType = SqlDbType.NVarChar;
            p[29] = new SqlParameter("@isnetwork", isnetwork);
            p[29].SqlDbType = SqlDbType.VarChar;
            p[30] = new SqlParameter("@clientit", clientit);
            p[30].SqlDbType = SqlDbType.Int;
            p[31] = new SqlParameter("@clientitdetail", clientitdetail);
            p[31].SqlDbType = SqlDbType.NVarChar;
            p[32] = new SqlParameter("@room", room);
            p[32].SqlDbType = SqlDbType.Int;
            p[33] = new SqlParameter("@volunteering", volun);
            p[33].SqlDbType = SqlDbType.Int;
            p[34] = new SqlParameter("@traveldetail", traveldetail);
            p[34].SqlDbType = SqlDbType.NVarChar;
            p[35] = new SqlParameter("@travelnearbus", travelbus);
            p[35].SqlDbType = SqlDbType.NVarChar;
            p[36] = new SqlParameter("@travelnearesrail", travelrail);
            p[36].SqlDbType = SqlDbType.NVarChar;
            p[37] = new SqlParameter("@travelnearairport", travelairport);
            p[37].SqlDbType = SqlDbType.NVarChar;
            p[38] = new SqlParameter("@hostvisit", hostvisit);
            p[38].SqlDbType = SqlDbType.Int;
            p[39] = new SqlParameter("@hostingcontact", hostcontact);
            p[39].SqlDbType = SqlDbType.VarChar;
            p[40] = new SqlParameter("@visitparkingonsite", visitonsite);
            p[40].SqlDbType = SqlDbType.Int;
            p[41] = new SqlParameter("@visitparkingspace", visitspace);
            p[41].SqlDbType = SqlDbType.VarChar;
            p[42] = new SqlParameter("@visitparkingaltemma", visitaltema);
            p[42].SqlDbType = SqlDbType.NVarChar;
            p[43] = new SqlParameter("@roomonlyrate", roomrate);
            p[43].SqlDbType = SqlDbType.NVarChar;
            p[44] = new SqlParameter("@bandbrate", bandrate);
            p[44].SqlDbType = SqlDbType.NVarChar;
            p[45] = new SqlParameter("@dbbrate", dbrate);
            p[45].SqlDbType = SqlDbType.NVarChar;
            p[46] = new SqlParameter("@hrrate", hrrate);
            p[46].SqlDbType = SqlDbType.NVarChar;
            p[47] = new SqlParameter("@teaandcoffe", teaandcoffe);
            p[47].SqlDbType = SqlDbType.NVarChar;
            p[48] = new SqlParameter("@lunch", lunch);
            p[48].SqlDbType = SqlDbType.Int;
            p[49] = new SqlParameter("@noofmeeting", nometting);
            p[49].SqlDbType = SqlDbType.NVarChar;
            p[50] = new SqlParameter("@meetingroomperday", meetingroom);
            p[50].SqlDbType = SqlDbType.NVarChar;
            p[51] = new SqlParameter("@coding", coding);
            p[51].SqlDbType = SqlDbType.NVarChar;
            p[52] = new SqlParameter("@negotiatedrate", negorate);
            p[52].SqlDbType = SqlDbType.NVarChar;
            p[53] = new SqlParameter("@bbnegotiatedrate", bbnegorate);
            p[53].SqlDbType = SqlDbType.NVarChar;
            p[54] = new SqlParameter("@dbbnegotitedrate", dbbnego);
            p[54].SqlDbType = SqlDbType.NVarChar;
            p[55] = new SqlParameter("@ddnegotiatedrate", ddnego);
            p[55].SqlDbType = SqlDbType.NVarChar;
            p[56] = new SqlParameter("@hrnegotiatedrate", hrnego);
            p[56].SqlDbType = SqlDbType.NVarChar;
            p[57] = new SqlParameter("@lastnegotitedrate", lastnego);
            p[57].SqlDbType = SqlDbType.NVarChar;
            p[58] = new SqlParameter("@renegotitedon", renego);
            p[58].SqlDbType = SqlDbType.NVarChar;
            p[59] = new SqlParameter("@preferred", preferred);
            p[59].SqlDbType = SqlDbType.NVarChar;
            p[60]=new SqlParameter("@ddrate",ddrate);
            p[60].SqlDbType = SqlDbType.NVarChar;
            p[61]=new SqlParameter("@active",active);
            p[61].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_Insert",p);

        }
        public void Update(string name, string know, int premiseid, string status, string statusdate, string add1, string add2, string add3, string postcode, string town, string county, string country, int primaryloc, int localmana, int stnetwork, string localdes, string phone, string fax, string mininum, int isnewshop, string shopflagdate, int specshop, int mediacontact, string medianame, string localdemo, int catefac, string catecontact, string catetype, string isnetwork, int clientit, string clientitdetail, int room, int volun, string traveldetail, string travelbus, string travelrail, string travelairport, int hostvisit, string hostcontact, int visitonsite, string visitspace, string visitaltema, string roomrate, string bandrate, string dbrate, string ddrate, string hrrate, string teaandcoffe, int lunch, string nometting, string meetingroom, string coding, string negorate, string bbnegorate, string dbbnego, string ddnego, string hrnego, string lastnego, string renego, string preferred, string commnent,int active)
        {
            SqlParameter[] p = new SqlParameter[62];
            p[0] = new SqlParameter("@name", name);
            p[0].SqlDbType = SqlDbType.NVarChar;
            p[1] = new SqlParameter("@know", know);
            p[1].SqlDbType = SqlDbType.NVarChar;
            p[2] = new SqlParameter("@premiseid", premiseid);
            p[2].SqlDbType = SqlDbType.Int;
            p[3] = new SqlParameter("@comment", commnent);
            p[3].SqlDbType = SqlDbType.NVarChar;
            p[4] = new SqlParameter("@status", status);
            p[4].SqlDbType = SqlDbType.NVarChar;
            p[5] = new SqlParameter("@statusdate", statusdate);
            p[5].SqlDbType = SqlDbType.NVarChar;
            p[6] = new SqlParameter("@add1", add1);
            p[6].SqlDbType = SqlDbType.NVarChar;
            p[7] = new SqlParameter("@add2", add2);
            p[7].SqlDbType = SqlDbType.NVarChar;
            p[8] = new SqlParameter("@add3", add3);
            p[8].SqlDbType = SqlDbType.NVarChar;
            p[9] = new SqlParameter("@postcode", postcode);
            p[9].SqlDbType = SqlDbType.VarChar;
            p[10] = new SqlParameter("@town", town);
            p[10].SqlDbType = SqlDbType.VarChar;
            p[11] = new SqlParameter("@county", county);
            p[11].SqlDbType = SqlDbType.VarChar;
            p[12] = new SqlParameter("@country", country);
            p[12].SqlDbType = SqlDbType.VarChar;
            p[13] = new SqlParameter("@primarylocation", primaryloc);
            p[13].SqlDbType = SqlDbType.Int;
            p[14] = new SqlParameter("@locationmanager", localmana);
            p[14].SqlDbType = SqlDbType.Int;
            p[15] = new SqlParameter("@stnetwork", stnetwork);
            p[15].SqlDbType = SqlDbType.Int;
            p[16] = new SqlParameter("@locades", localdes);
            p[16].SqlDbType = SqlDbType.NVarChar;
            p[17] = new SqlParameter("@phone", phone);
            p[17].SqlDbType = SqlDbType.VarChar;
            p[18] = new SqlParameter("@fax", fax);
            p[18].SqlDbType = SqlDbType.VarChar;
            p[19] = new SqlParameter("@mininumber", mininum);
            p[19].SqlDbType = SqlDbType.VarChar;
            p[20] = new SqlParameter("@isnewshop", isnewshop);
            p[20].SqlDbType = SqlDbType.Int;
            p[21] = new SqlParameter("@shopflagdate", shopflagdate);
            p[21].SqlDbType = SqlDbType.NVarChar;
            p[22] = new SqlParameter("@specshop", specshop);
            p[22].SqlDbType = SqlDbType.Int;
            p[23] = new SqlParameter("@mediacontact", mediacontact);
            p[23].SqlDbType = SqlDbType.Int;
            p[24] = new SqlParameter("@mediacontactname", medianame);
            p[24].SqlDbType = SqlDbType.VarChar;
            p[25] = new SqlParameter("@localdemo", localdemo);
            p[25].SqlDbType = SqlDbType.NVarChar;
            p[26] = new SqlParameter("@cateringfac", catefac);
            p[26].SqlDbType = SqlDbType.Int;
            p[27] = new SqlParameter("@cateringcontact", catecontact);
            p[27].SqlDbType = SqlDbType.VarChar;
            p[28] = new SqlParameter("@cateringtype", catetype);
            p[28].SqlDbType = SqlDbType.NVarChar;
            p[29] = new SqlParameter("@isnetwork", isnetwork);
            p[29].SqlDbType = SqlDbType.VarChar;
            p[30] = new SqlParameter("@clientit", clientit);
            p[30].SqlDbType = SqlDbType.Int;
            p[31] = new SqlParameter("@clientitdetail", clientitdetail);
            p[31].SqlDbType = SqlDbType.NVarChar;
            p[32] = new SqlParameter("@room", room);
            p[32].SqlDbType = SqlDbType.Int;
            p[33] = new SqlParameter("@volunteering", volun);
            p[33].SqlDbType = SqlDbType.Int;
            p[34] = new SqlParameter("@traveldetail", traveldetail);
            p[34].SqlDbType = SqlDbType.NVarChar;
            p[35] = new SqlParameter("@travelnearbus", travelbus);
            p[35].SqlDbType = SqlDbType.NVarChar;
            p[36] = new SqlParameter("@travelnearesrail", travelrail);
            p[36].SqlDbType = SqlDbType.NVarChar;
            p[37] = new SqlParameter("@travelnearairport", travelairport);
            p[37].SqlDbType = SqlDbType.NVarChar;
            p[38] = new SqlParameter("@hostvisit", hostvisit);
            p[38].SqlDbType = SqlDbType.Int;
            p[39] = new SqlParameter("@hostingcontact", hostcontact);
            p[39].SqlDbType = SqlDbType.VarChar;
            p[40] = new SqlParameter("@visitparkingonsite", visitonsite);
            p[40].SqlDbType = SqlDbType.Int;
            p[41] = new SqlParameter("@visitparkingspace", visitspace);
            p[41].SqlDbType = SqlDbType.VarChar;
            p[42] = new SqlParameter("@visitparkingaltemma", visitaltema);
            p[42].SqlDbType = SqlDbType.NVarChar;
            p[43] = new SqlParameter("@roomonlyrate", roomrate);
            p[43].SqlDbType = SqlDbType.NVarChar;
            p[44] = new SqlParameter("@bandbrate", bandrate);
            p[44].SqlDbType = SqlDbType.NVarChar;
            p[45] = new SqlParameter("@dbbrate", dbrate);
            p[45].SqlDbType = SqlDbType.NVarChar;
            p[46] = new SqlParameter("@hrrate", hrrate);
            p[46].SqlDbType = SqlDbType.NVarChar;
            p[47] = new SqlParameter("@teaandcoffe", teaandcoffe);
            p[47].SqlDbType = SqlDbType.NVarChar;
            p[48] = new SqlParameter("@lunch", lunch);
            p[48].SqlDbType = SqlDbType.Int;
            p[49] = new SqlParameter("@noofmeeting", nometting);
            p[49].SqlDbType = SqlDbType.NVarChar;
            p[50] = new SqlParameter("@meetingroomperday", meetingroom);
            p[50].SqlDbType = SqlDbType.NVarChar;
            p[51] = new SqlParameter("@coding", coding);
            p[51].SqlDbType = SqlDbType.NVarChar;
            p[52] = new SqlParameter("@negotiatedrate", negorate);
            p[52].SqlDbType = SqlDbType.NVarChar;
            p[53] = new SqlParameter("@bbnegotiatedrate", bbnegorate);
            p[53].SqlDbType = SqlDbType.NVarChar;
            p[54] = new SqlParameter("@dbbnegotitedrate", dbbnego);
            p[54].SqlDbType = SqlDbType.NVarChar;
            p[55] = new SqlParameter("@ddnegotiatedrate", ddnego);
            p[55].SqlDbType = SqlDbType.NVarChar;
            p[56] = new SqlParameter("@hrnegotiatedrate", hrnego);
            p[56].SqlDbType = SqlDbType.NVarChar;
            p[57] = new SqlParameter("@lastnegotitedrate", lastnego);
            p[57].SqlDbType = SqlDbType.NVarChar;
            p[58] = new SqlParameter("@renegotitedon", renego);
            p[58].SqlDbType = SqlDbType.NVarChar;
            p[59] = new SqlParameter("@preferred", preferred);
            p[59].SqlDbType = SqlDbType.NVarChar;
            p[60] = new SqlParameter("@ddrate", ddrate);
            p[60].SqlDbType = SqlDbType.NVarChar;
            p[61] = new SqlParameter("@active", active);
            p[61].SqlDbType = SqlDbType.Int;
            h.ExecuteNonQuerry("Premise_Update", p);

        }
    }
}